package utils.jn;

public enum State {
	FREE("free", false), OCCUPIED("occupied", true), RESERVED("reserved", true);

	public String name;
	public boolean reserved;

	State(String name, boolean reserved) {
		this.name = name;
		this.reserved = reserved;
	}

	public String toString() {
		return this.name;
	}

	/**
	 * See if the state is occupied
	 * 
	 * @return true if it is or false otherwise
	 */
	public boolean isOccupied() {
		return this.reserved;
	}
}